﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;


/// <summary>
/// Summary description for Config
/// </summary>
public static class MyConfig
{
  public static string serverPath;
  public static string MailUserName = "";
  public static string MailPassWord = "";
  public static void LoadMail()
  {
      try
      {
          XElement xml = XElement.Load(HttpContext.Current.Server.MapPath("Mail.xml"));
          XElement mailFromName = xml.Descendants("MailFrom").Descendants("Name").First();
          XElement mailFromPass = xml.Descendants("MailFrom").Descendants("Pass").First();
          MailUserName = mailFromName.Value;
          MailPassWord = mailFromPass.Value;
      }
      catch { }
  }

}